<template>
	<div class="hot">
		<ul>
			<h3>TOP 10 热门文章</h3>
			<li v-for="(post,index) in res" :key="post.id">
				<p>
					<router-link to="">
						<span :class="{orange:index<3}">{{index+1}}</span>
						{{post.title}}
					</router-link>

				</p>
				<p style="border: 1px dashed #eeeeee;"></p>
			</li>

		</ul>
	</div>
</template>

<script>
	let hot = [{
			"id": "1",
			"title": "PHP学科:MySQL手册免费分享",
		},
		{
			"id": "2",
			"title": "前端必学框架Bootstrap,3天...",
		},
		{
			"id": "3",
			"title": "PHP进阶:要想提高PHP的编程效率...",
		},
		{
			"id": "4",
			"title": "最涨薪PHP项目——PHP微...",
		},
		{
			"id": "5",
			"title": "这是第一篇文章",
		},
		{
			"id": "6",
			"title": "b 想少走弯路,就看看这个贴:PHP...",
		},

	]
	export default {
		data() {
			return {
				res: hot
			}
		}
	}
</script>

<style scoped>
	.hot {
		background: #fff;
	}

	a {
		text-decoration: none;
		color: #000000;
	}

	li {
		text-align: left;
		list-style: none;
		margin-top: 18px;
	}

	ul {
		padding: 0;
	}

	.orange {
		color: orange;
	}
</style>
